//
//  NSString+Mantis.m
//  NLProjectFrameworkDemo
//
//  Created by iosdeveloper on 2020/5/7.
//  Copyright © 2020 yj_zhang. All rights reserved.
//

#import "NSString+Mantis.h"

@implementation NSString (Mantis)

+(BOOL)isBlankString:(NSString *)string{
    if (string == nil || string == NULL||[string isEqualToString:@""]||[string isEqualToString:@"null"]||string.length==0) {
        return YES;
    }
    if ([string isKindOfClass:[NSNull class]]) {
        return YES;
    }
    if ([[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0) {
        return YES;
    }
    return NO;
}

+(NSString*)getNewImgurlFromurl:(NSString *)urlStr{
    NSString*imgUrl =urlStr;
    imgUrl= [imgUrl stringByReplacingOccurrencesOfString:@"<img src='" withString:@""];
    imgUrl= [imgUrl stringByReplacingOccurrencesOfString:@"' />" withString:@""];
    imgUrl= [imgUrl stringByReplacingOccurrencesOfString:@"<img src=\"" withString:@""];
    imgUrl= [imgUrl stringByReplacingOccurrencesOfString:@"\">" withString:@""];
    return imgUrl;
}

@end
